-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Support dependency view #887
Conversation
extension/src/client/GradleClient.ts
Outdated
this.statusBarItem.text = '$(warning) Gradle: Build Error'; | ||
this.statusBarItem.show(); | ||
} finally { | ||
process.nextTick(() => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the nextTick
trick for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I just follow the logics from getBuild
, and I'll consider about whether we really need it again.
There are still some known issues about this feature:
I'll address these issues by a new commit after #888 got merged. |
gradle-server/src/main/java/com/github/badsyntax/gradle/handlers/GetDependenciesHandler.java
Outdated
Show resolved
Hide resolved
836500a
to
43ef669
Compare
@@ -235,7 +235,6 @@ describe(getSuiteName('Gradle tasks'), () => { | |||
groupItem.label, | |||
mockTaskDefinition1ForFolder1.group | |||
); | |||
assert.strictEqual(groupItem.iconPath, vscode.ThemeIcon.Folder); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since we changed the themeicon in https://github.com/microsoft/vscode-gradle/pull/887/files#diff-183471d1a24e3c81ad33c4c977c62b13d94770466ca974bb60b5efcf3d6778d2 , IMO there is no way to check the icon so I simply remove it.
return projectItem; | ||
} | ||
|
||
export function protocolItem2DependencyConfigurationTreeItem( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why export? I don't find any other caller.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will remove these redundant export
s.
return configurationItem; | ||
} | ||
|
||
export function protocolItem2DependencyTreeItem( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why export? I don't find any other caller.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall
Depends on #888
This work is still in progress. Here to collect comments and feedbacks.
cc: @testforstephen @Eskibear @jdneo
Here we just use a gradle plugin (see #888 ) to get the project dependencies and register a request
GetDependenciesRequest
to get them, in the client side, we just show dependencies and tasks in the same view and group them.Note: I didn't change the view id
gradleTasksView
in this PR since it would bring a lot of changes in test and other components.